import request from '../../api/base'

export function getRaterPage(pageNum, status = null) {
  let data = {pageSize: 50, pageNum: pageNum};
  if (status !== null)
    data.status = status;
  return  request({
    method: 'post',
    url: 'api/member/api-member/member/getRaterPage',
    data: data,
    requestType: 'form'
  }).then(res => {
    if (res.flag){
      return res.data
    }
    return [];
  })
}

export function getTopicInfo(programId) {
  return  request({
    method: 'post',
    url: 'api/member/api-member/member/getTopicInfo',
    data: {programId},
    requestType: 'form'
  }).then(res => {
    if (res.flag){
      return res.data
    }
    return [];
  })
}

export function getSoreTopicScore(id) {
  return  request({
    method: 'get',
    url: 'api/member/api-member/member/getSoreTopicScore',
    data: {id},
    requestType: 'form'
  }).then(res => {
    if (res.flag){
      return res.data
    }
    return [];
  })
}

export function saveRaterTopicInfo(data) {
  return  request({
    method: 'post',
    url: 'api/member/api-member/member/saveRaterTopicInfo',
    data: data,
  }).then(res => res)
}


